package com.lagou.rpc.common.utils;

/**
 * com.lagou.niancheng.rpc.common.utils.MethodIdUtils
 *
 * @author wlz
 * @date 2020/5/19
 */
public class MethodIdUtil {

    public static String getMethodId(String className, String methodName, String[] paramTypeNames) {
        StringBuilder buf = new StringBuilder();
        buf.append(className).append(methodName);
        if (paramTypeNames != null) {
            for (String paramTypeName : paramTypeNames) {
                buf.append(paramTypeName);
            }
        }
        return MD5Utils.MD5Encode(buf.toString());
    }
}
